3.1.28 \(\int \frac {A+B x}{x^3 \sqrt {a+b x^2}} \, dx\) [28]

Optimal. Leaf size=72 \[ -\frac {A \sqrt {a+b x^2}}{2 a x^2}-\frac {B \sqrt {a+b x^2}}{a x}+\frac {A b \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{2 a^{3/2}} \]

[Out]

1/2*A*b*arctanh((b*x^2+a)^(1/2)/a^(1/2))/a^(3/2)-1/2*A*(b*x^2+a)^(1/2)/a/x^2-B*(b*x^2+a)^(1/2)/a/x

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {849, 821, 272, 65, 214} \begin {gather*} \frac {A b \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{2 a^{3/2}}-\frac {A \sqrt {a+b x^2}}{2 a x^2}-\frac {B \sqrt {a+b x^2}}{a x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(x^3*Sqrt[a + b*x^2]),x]

[Out]

-1/2*(A*Sqrt[a + b*x^2])/(a*x^2) - (B*Sqrt[a + b*x^2])/(a*x) + (A*b*ArcTanh[Sqrt[a + b*x^2]/Sqrt[a]])/(2*a^(3/
2))

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 821

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(-(e*f - d*g
))*(d + e*x)^(m + 1)*((a + c*x^2)^(p + 1)/(2*(p + 1)*(c*d^2 + a*e^2))), x] + Dist[(c*d*f + a*e*g)/(c*d^2 + a*e
^2), Int[(d + e*x)^(m + 1)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, m, p}, x] && NeQ[c*d^2 + a*e^2, 0
] && EqQ[Simplify[m + 2*p + 3], 0]

Rule 849

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(e*f - d*g)*
(d + e*x)^(m + 1)*((a + c*x^2)^(p + 1)/((m + 1)*(c*d^2 + a*e^2))), x] + Dist[1/((m + 1)*(c*d^2 + a*e^2)), Int[
(d + e*x)^(m + 1)*(a + c*x^2)^p*Simp[(c*d*f + a*e*g)*(m + 1) - c*(e*f - d*g)*(m + 2*p + 3)*x, x], x], x] /; Fr
eeQ[{a, c, d, e, f, g, p}, x] && NeQ[c*d^2 + a*e^2, 0] && LtQ[m, -1] && (IntegerQ[m] || IntegerQ[p] || Integer
sQ[2*m, 2*p])

Rubi steps

\begin {align*} \int \frac {A+B x}{x^3 \sqrt {a+b x^2}} \, dx &=-\frac {A \sqrt {a+b x^2}}{2 a x^2}-\frac {\int \frac {-2 a B+A b x}{x^2 \sqrt {a+b x^2}} \, dx}{2 a}\\ &=-\frac {A \sqrt {a+b x^2}}{2 a x^2}-\frac {B \sqrt {a+b x^2}}{a x}-\frac {(A b) \int \frac {1}{x \sqrt {a+b x^2}} \, dx}{2 a}\\ &=-\frac {A \sqrt {a+b x^2}}{2 a x^2}-\frac {B \sqrt {a+b x^2}}{a x}-\frac {(A b) \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,x^2\right )}{4 a}\\ &=-\frac {A \sqrt {a+b x^2}}{2 a x^2}-\frac {B \sqrt {a+b x^2}}{a x}-\frac {A \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x^2}\right )}{2 a}\\ &=-\frac {A \sqrt {a+b x^2}}{2 a x^2}-\frac {B \sqrt {a+b x^2}}{a x}+\frac {A b \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{2 a^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.22, size = 65, normalized size = 0.90 \begin {gather*} -\frac {(A+2 B x) \sqrt {a+b x^2}}{2 a x^2}-\frac {A b \tanh ^{-1}\left (\frac {\sqrt {b} x-\sqrt {a+b x^2}}{\sqrt {a}}\right )}{a^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(x^3*Sqrt[a + b*x^2]),x]

[Out]

-1/2*((A + 2*B*x)*Sqrt[a + b*x^2])/(a*x^2) - (A*b*ArcTanh[(Sqrt[b]*x - Sqrt[a + b*x^2])/Sqrt[a]])/a^(3/2)

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 69, normalized size = 0.96

method result size
risch \(-\frac {\sqrt {b \,x^{2}+a}\, \left (2 B x +A \right )}{2 a \,x^{2}}+\frac {A b \ln \left (\frac {2 a +2 \sqrt {a}\, \sqrt {b \,x^{2}+a}}{x}\right )}{2 a^{\frac {3}{2}}}\) \(55\)
default \(A \left (-\frac {\sqrt {b \,x^{2}+a}}{2 a \,x^{2}}+\frac {b \ln \left (\frac {2 a +2 \sqrt {a}\, \sqrt {b \,x^{2}+a}}{x}\right )}{2 a^{\frac {3}{2}}}\right )-\frac {B \sqrt {b \,x^{2}+a}}{a x}\) \(69\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/x^3/(b*x^2+a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

A*(-1/2*(b*x^2+a)^(1/2)/a/x^2+1/2*b/a^(3/2)*ln((2*a+2*a^(1/2)*(b*x^2+a)^(1/2))/x))-B*(b*x^2+a)^(1/2)/a/x

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 56, normalized size = 0.78 \begin {gather*} \frac {A b \operatorname {arsinh}\left (\frac {a}{\sqrt {a b} {\left | x \right |}}\right )}{2 \, a^{\frac {3}{2}}} - \frac {\sqrt {b x^{2} + a} B}{a x} - \frac {\sqrt {b x^{2} + a} A}{2 \, a x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^3/(b*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

1/2*A*b*arcsinh(a/(sqrt(a*b)*abs(x)))/a^(3/2) - sqrt(b*x^2 + a)*B/(a*x) - 1/2*sqrt(b*x^2 + a)*A/(a*x^2)

________________________________________________________________________________________

Fricas [A]
time = 4.60, size = 123, normalized size = 1.71 \begin {gather*} \left [\frac {A \sqrt {a} b x^{2} \log \left (-\frac {b x^{2} + 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right ) - 2 \, {\left (2 \, B a x + A a\right )} \sqrt {b x^{2} + a}}{4 \, a^{2} x^{2}}, -\frac {A \sqrt {-a} b x^{2} \arctan \left (\frac {\sqrt {-a}}{\sqrt {b x^{2} + a}}\right ) + {\left (2 \, B a x + A a\right )} \sqrt {b x^{2} + a}}{2 \, a^{2} x^{2}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^3/(b*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[1/4*(A*sqrt(a)*b*x^2*log(-(b*x^2 + 2*sqrt(b*x^2 + a)*sqrt(a) + 2*a)/x^2) - 2*(2*B*a*x + A*a)*sqrt(b*x^2 + a))
/(a^2*x^2), -1/2*(A*sqrt(-a)*b*x^2*arctan(sqrt(-a)/sqrt(b*x^2 + a)) + (2*B*a*x + A*a)*sqrt(b*x^2 + a))/(a^2*x^
2)]

________________________________________________________________________________________

Sympy [A]
time = 1.76, size = 66, normalized size = 0.92 \begin {gather*} - \frac {A \sqrt {b} \sqrt {\frac {a}{b x^{2}} + 1}}{2 a x} + \frac {A b \operatorname {asinh}{\left (\frac {\sqrt {a}}{\sqrt {b} x} \right )}}{2 a^{\frac {3}{2}}} - \frac {B \sqrt {b} \sqrt {\frac {a}{b x^{2}} + 1}}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x**3/(b*x**2+a)**(1/2),x)

[Out]

-A*sqrt(b)*sqrt(a/(b*x**2) + 1)/(2*a*x) + A*b*asinh(sqrt(a)/(sqrt(b)*x))/(2*a**(3/2)) - B*sqrt(b)*sqrt(a/(b*x*
*2) + 1)/a

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 146 vs. \(2 (58) = 116\).
time = 0.97, size = 146, normalized size = 2.03 \begin {gather*} -\frac {A b \arctan \left (-\frac {\sqrt {b} x - \sqrt {b x^{2} + a}}{\sqrt {-a}}\right )}{\sqrt {-a} a} + \frac {{\left (\sqrt {b} x - \sqrt {b x^{2} + a}\right )}^{3} A b + 2 \, {\left (\sqrt {b} x - \sqrt {b x^{2} + a}\right )}^{2} B a \sqrt {b} + {\left (\sqrt {b} x - \sqrt {b x^{2} + a}\right )} A a b - 2 \, B a^{2} \sqrt {b}}{{\left ({\left (\sqrt {b} x - \sqrt {b x^{2} + a}\right )}^{2} - a\right )}^{2} a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^3/(b*x^2+a)^(1/2),x, algorithm="giac")

[Out]

-A*b*arctan(-(sqrt(b)*x - sqrt(b*x^2 + a))/sqrt(-a))/(sqrt(-a)*a) + ((sqrt(b)*x - sqrt(b*x^2 + a))^3*A*b + 2*(
sqrt(b)*x - sqrt(b*x^2 + a))^2*B*a*sqrt(b) + (sqrt(b)*x - sqrt(b*x^2 + a))*A*a*b - 2*B*a^2*sqrt(b))/(((sqrt(b)
*x - sqrt(b*x^2 + a))^2 - a)^2*a)

________________________________________________________________________________________

Mupad [B]
time = 1.35, size = 58, normalized size = 0.81 \begin {gather*} \frac {A\,b\,\mathrm {atanh}\left (\frac {\sqrt {b\,x^2+a}}{\sqrt {a}}\right )}{2\,a^{3/2}}-\frac {B\,\sqrt {b\,x^2+a}}{a\,x}-\frac {A\,\sqrt {b\,x^2+a}}{2\,a\,x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/(x^3*(a + b*x^2)^(1/2)),x)

[Out]

(A*b*atanh((a + b*x^2)^(1/2)/a^(1/2)))/(2*a^(3/2)) - (B*(a + b*x^2)^(1/2))/(a*x) - (A*(a + b*x^2)^(1/2))/(2*a*
x^2)

________________________________________________________________________________________